import axios from 'axios';

const url = '/adminapi/message/';

export interface QueryParams extends Partial<any> {
  page: number;
  limit: number;
}

export interface DataListRes {
  data: any[];
  total: number;
}

/**
 * 列表
 */
export function apiList(params?: QueryParams) {
  return axios.get<any>(`${url}list`, { params });
}

/**
 * 操作
 */
export function apiHandle(params: any) {
  return axios.get(`${url}handle`, { params });
}
